#include <iostream>
#include <iomanip>
#include <cmath>

using namespace std;

int main_0010()
{
    int weight;
    cin >> weight;
    float money = 0.2;
    if (weight > 30) {
        cout << "Fail";
        return 0;
    } else if ( weight > 20) {
        money += 0.70 * (weight - 20) + 7.5 + 8;
    } else if ( weight > 10) {
        money += 0.75 * (weight - 10) + 8;
    } else {
        money += 0.8 * weight;
    }
    cout << fixed << setprecision(2) << money;
    return 0;
}
